//
//  HTHttpRequestManager.h
//  TruckDriver
//
//  Created by Ting Han on 2017/10/19.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface HTHttpRequestManager : NSObject

/**
 新版本
 */
+ (void)checkNewVersionSuccess:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
#pragma mark ---- 登陆
/**
 请求验证码
 @param phoneNum 电话号码
 @param success 请求成功
 @param failure 请求失败
 */
+ (void)requestSecurityCodeWithPhoneNum:(nullable NSString *)phoneNum success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 请求登陆
 
 @param phoneNum phoneNum
 @param code 验证码
 @param success success
 @param failure fail
 */
+ (void)requestLoginWithPhoneNum:(nullable NSString *)phoneNum withSecurityCode:(nullable NSString *)code success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;


#pragma mark --- 发货部分
/**
 发布货源
 */
+ (void)requestDeliverGoodsWithFromaddress:(nullable NSString *)fromAddress toaddress:(nullable NSString *)toAddress fromProvince:(nullable NSString *)fromProvince toProvince:(nullable NSString *)toProvince cargotype:(nullable NSString *)cargotype lenght:(nullable NSString *)lenght lengthtype:(nullable NSString *)lengthtype weight:(nullable NSString *)weight utit:(nullable NSString *)utit pricers:(nullable NSString *)pricers strattime:(nullable NSString *)strattime paytype:(nullable NSString *)paytype addtype:(nullable NSString *)addtype remark:(nullable NSString *)remark boostime:(nullable NSString *)boostime iscity:(nullable NSString *)iscity isworkes:(nullable NSString *)isworkes goodstype:(nullable NSString *)goodstype  success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 发布货源列表
 */
+ (void)requestDeliverGoodsListWithState:(nullable NSString *)state success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
  获取货主详情
 */
+ (void)requestDeliverHolderInfoWithProductid:(nullable NSString *)productid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 货源信息状态变更
 */
+ (void)requestDeliverStateChangeWithProduceid:(nullable NSString *)produceid state:(nullable NSString *)state success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 获取常发货源
 */
+ (void)requestDeliverGoodsFrequencyWithSuccess:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 删除常发货源
 */
+ (void)requestDeliverGoodsDeleteWithWithProductid:(nullable NSString *)productid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 发布货源（曾发布过）
 */
+ (void)requestDeliverGoodsUsedWithProductid:(nullable NSString *)productid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 编辑货源信息（获取到信息）
 */
+ (void)requestDeliverGoodsInfoWithProductid:(nullable NSString *)productid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

#pragma mark --- 常用车辆部分
/**
 添加常用车辆
 */
+ (void)requestTruckAddWithCarid:(nullable NSString *)carid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 获取常用车辆列表
 */
+ (void)requestTruckListWithCarstate:(nullable NSString *)carstate length:(nullable NSString *)length cargotype:(nullable NSString *)cargotype state:(nullable NSString *)state Success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 查询车辆列表
 */
+ (void)requestTruckListMapWithCarstate:(nullable NSString *)carstate length:(nullable NSString *)length cargotype:(nullable NSString *)cargotype state:(nullable NSString *)state success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;


/**
 删除常用的车辆
 */
+ (void)requestTruckDeleteWithCarid:(nullable NSString *)carid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 搜索司机
 */
+ (void)requestTruckDriverWithType:(nullable NSString *)type phone:(nullable NSString *)phone success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 查询司机首页
 */
+ (void)requestTruckDriverInfoWithDriverid:(nullable NSString *)driverid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 查询司机信息
 */
+ (void)requestTruckDriverCarInfoWithDriverid:(nullable NSString *)driverid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
#pragma mark --- 订阅线路
/**
 获取订阅线路列表
 */
+ (void)requestOrderlineListSuccess:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 添加订阅线路
 */
+ (void)requestOrderlineAddWithFromAddress:(nullable NSString *)fromAddress withToAddress:(nullable NSString *)toAddress success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 删除订阅线路
 */
+ (void)requestOrderlineDeleteWithId:(nullable NSString *)withId success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 根据订阅线路查询货源
 */
+ (void)requestOrderlineSearchWithId:(nullable NSString *)withId WithPage:(nullable NSString *)page success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;


#pragma mark -- 货源搜索
/**
 货源搜索
 */
+ (void)requestGoodsSearchWithStarname:(nullable NSString *)starname endname:(nullable NSString *)endname length:(nullable NSString *)length  cartype:(nullable NSString *)cartype cargotype:(nullable NSString *)cargotype page:(nullable NSString *)page success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 货源详情
 */
+ (void)requestGoodsDetialWithProductid:(nullable NSString *)productid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 货主资料
 */
+ (void)requestHolderInforWithCargoid:(nullable NSString *)cargoid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

#pragma mark --- 运单
/**
 运单列表
 */
+ (void)requestWaybillListWithState:(nullable NSString *)state page:(nullable NSString *)page success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 确认收货
 */
+ (void)requestWaybillComformReceivedWithId:(nullable NSString *)withid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 运单详情
 */
+ (void)requestWaybillDetialWithOrderid:(nullable NSString *)orderid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 货主端评论
 */
+ (void)requestWaybillCommentWithOrderid:(nullable NSString *)orderid scroller:(nullable NSString *)scroller impersson:(nullable NSString *)impersson success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 取消订单
 */
+ (void)requestWaybillCancleWithOrderid:(nullable NSString *)orderid contenid:(nullable NSString *)contenid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 确认订单
 */
+ (void)requestWaybillComformWithOrderid:(nullable NSString *)orderid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

#pragma mark --- 个人信息
/**
  认证
 */
+ (void)requestUserRegisterWithName:(nullable NSString *)name carid:(nullable NSString *)carid companyname:(nullable NSString *)companyname addres:(nullable NSString *)addres addressinfor:(nullable NSString *)addressinfor licence:(nullable NSString *)licence licenceno:(nullable NSString *)licenceno  success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 上传图片
 */
+ (void)requestUploadPictureWithType:(nullable NSString *)type image:(UIImage *_Nullable)image success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 个人信息
 */
+ (void)requestUserInfosuccess:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 个人信息详情
 */
+ (void)requestUserInfoDetialsuccess:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

#pragma mark --- 通知
/*
 友盟注册
 */
+ (void)requestNotificationRegisterWithType:(nullable NSString *)type regitid:(nullable NSString *)regitid success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

/**
 获取消息列表
 */
+ (void)requestUserMessageListWithSuccess:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 上传地理位置
 */
+ (void)requestUploadAddressWithAddress:(nullable NSString *)address lat:(nullable NSString *)lat lng:(nullable NSString *)lng success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;
/**
 获取地理位置列表
 */
+ (void)requestGetAddressListWithCarid:(nullable NSString *)carid Success:(nullable void (^)(id _Nullable responseObject))success failure:(nullable void (^)(NSError * _Nonnull error))failure;

@end
